#!/usr/bin/python3
from collections import defaultdict
content=input("please input a String:")
dic=defaultdict(lambda:0)
for i in content:
    dic[i]+=1

for k in dic:
    print(k,dic[k]) 
